UI Text

A text element that can be displayed on the screen

Properties

Name Type Description
TextStringThe text content to display
FontSizeNumberThe size of the text font
FontColorPartColorThe color of the text
WordWrapBooleanControls whether text should wrap to multiple lines (true) or stay on a single line (false)
OverflowEnabledBooleanControls whether text overflows or gets cut off when too long
HorizontalAlignmentStringSets horizontal alignment: 'left', 'center', or 'right'
VerticalAlignmentStringSets vertical alignment: 'top', 'middle', or 'bottom'
BoldBooleanControls if text should be displayed in bold
ItalicBooleanControls if text should be displayed in italics
UnderlineBooleanControls if text should be underlined
CharacterSpacingNumberThe spacing between characters (in points)
LineSpacingNumberThe spacing between lines of text (in points)
TextWidthNumberGets the width of the text in pixels
TextHeightNumberGets the height of the text in pixels
Inherited from UIElement Position absolutePosition Scale Rotation Name TextureID isActive Width Height

Functions

Name Returns Description
ClearVoidClears all text content
AppendVoidAppends text to the existing content
SetTextAlphaVoidSets the text alpha/opacity (0-1)
Inherited from UIElement AnchorToTop AnchorToBottom AnchorToLeft AnchorToRight AnchorToTopLeft AnchorToTopRight AnchorToBottomLeft AnchorToBottomRight Delete SetParent AddChild SetOpacity Rotate SetActive

Events

Name Description